<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>同窗</title>
</head>
<body>
<div id="studentClassmates" style="width: 400px;margin: 100px auto; display: none">
    <form class="layui-form layui-form-pane" id="formLogin"  lay-filter="studentClassmatesFilter">
        <div class="layui-form-item">
            <label class="layui-form-label" style="width: 180px">同一个月出生的同学</label>
            <div class="layui-input-inline">
                <input type="text" name="sameMonth" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label" style="width: 180px">同一个班级的同学</label>
            <div class="layui-input-inline">
                <input type="text" name="sameClass" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label" style="width: 180px">同一个小区的同学</label>
            <div class="layui-input-inline">
                <input type="text" name="sameAddress"  autocomplete="off" class="layui-input">
            </div>
        </div>
        <!--<div class="layui-form-item">-->
            <!--<button  class="layui-btn" lay-submit lay-filter="doSubmit">登录</button>-->
            <!--<button  class="layui-btn">重置</button>-->
        <!--</div>-->
    </form>
</div>
</body>
<script>
    layui.use(["layer","form"],function () {
        let layer=layui.layer;
        let form=layui.form;
        $.post("/student/predestinedStudent",function (res) {
                layer.open({
                    type:1,
                    title:"有缘人",
                    area:['500px','500px'],
                    shade:0,
                    content:$("#studentClassmates"),
                    success:function () {
                        form.val("studentClassmatesFilter",{
                            "sameMonth":res.data.sameMonth,
                            "sameClass":res.data.sameClass,
                            "sameAddress":res.data.sameAddress
                        })
                    }
                })
        })
    })
</script>
</html>